﻿@{
    Uri url = new Uri(Request.Url.AbsoluteUri);
    ViewBag.Server = url.GetLeftPart(UriPartial.Authority);
    ViewBag.Title = "RVA Master Portal";
    string RafikiMasterVM = System.Configuration.ConfigurationManager.AppSettings["RafikiMasterVM"];
    string crudServiceBaseUrl = ViewBag.Server + "/api/";

}
@* Style for the Loading Div - can be moved later *@
<style>
    #loading {
    background-color: white;
    z-index: 1000;
    opacity: .5;
    bottom: 0;
    left: 0;
    position: fixed;
    right: 0;
    text-align: center;
    top: 0;
}

#loading * {
    vertical-align: middle;
}

#loading_box {
    display: inline-block;
    height: 100%;
}
#loading_txt {
    color: red;
    font-weight: bold;
/*    margin-left: 0.5em;*/
    font-family: "Arial Black", Gadget, sans-serif;
}
</style>

@* LOading Div with spinner *@
<div id="loading">
    <div id="loading_box"></div>
    <img src="~/Images/spinner.gif" />
    <span id="loading_txt">Loading...</span>
</div>

@* Main Page: *@
<div id="BINDDIV-Master">
    <div id="subpage"></div>
</div>

@* Code for Loading Div and Loading first SHOWENTITY page*@
<script>
    var $loading = $('#loading').hide();
    $(document)
      .ajaxStart(function () {
          $loading.show();
      })
      .ajaxStop(function () {
          $loading.hide();
      });
    kendo.bind($("#BINDDIV-Master"),@(RafikiMasterVM));
    $("#subpage").load("@Url.Action("ShowEntity", "Home")?EntityID="+@(RafikiMasterVM).userEntityID);
</script>

